package com.xgxx.chendawei.system.controller;

import com.xgxx.chendawei.common.DatePropertyEditor;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.InitBinder;

import java.sql.Timestamp;
import java.util.Date;


public abstract class AbstractBaseController {

    @InitBinder
    public void initBinder(WebDataBinder binder) {
        binder.setAutoGrowCollectionLimit(Integer.MAX_VALUE);
        binder.registerCustomEditor(Date.class, new DatePropertyEditor(true));
        binder.registerCustomEditor(Timestamp.class, new DatePropertyEditor(true));
    }
}
